Switch# vlan database 
Switch(vlan)# vtp domain domain-name 

Switch(vlan)# vtp domain domain-name password password-value 

Switch(vlan)# vtp server 

Switch(vlan)# show vtp status 

Disable VTPֻ뽫VTPģʽΪtransparent 

Switch(vlan)# vtp transparent 

2. VTP V2ĬϵVTP V1 

Switch# vlan database 

Switch(vlan)# vtp v2-mode 

Switch# show vtp status 

3. VLANCatalyst 2900XLϵн֧64VLAN 

VLAN ID Ŵ11005 

Switch# vlan database 

Switch(vlan)# vlan vlan-id name vlan-name 

Switch# show vlan name vlan-name 

Switch(vlan)# no vlan vlan-id //ɾVLAN 

4. ˿ڼVLAN 

Switch# configure terminal 

Switch(config)# interface interface 

Switch(config-if)# switchport mode access 

Switch(config-if)# switchport access vlan vlan-id 

Switch(config-if)# show interface interface-id switchport 

5. trunk ˿ڡ 

Switch# configure terminal 

Switch(config)# interface interface 

Switch(config-if)# switchport mode trunk 

Switch(config-if)# switchport trunk encapsulation isl 

Switch(config-if)# end 

Switch# show interface interface switchport 

Switch# copy running-config startup-config 

6. trunk VLAN 

Switch(config)# interface interface 

Switch(config-if)# switchport mode trunk 

Switch(config-if)# switchport trunk allowed vlan remove vlan-id-range 

Switch(config-if)# switchport trunk allowed vlan add vlan-id-range 

Switch(config-if)# end 

Switch# show interface interface switchport allowed-vlan 

ȡtrunk˿ڣֻ 

Switch(config-if)# no switchport mode 

7. ʹSTPʵָء 

ʵָطֵַ 

1) ʹö˿ȼ 

ã 

Switch_1(config-if)# interface fa0/1 

Switch_1(config-if)# spanning-tree vlan 8 9 10 port-priority 10 

Switch_1(config)# interface fa0/2 

Switch_1(config-if)# spanning-tree vlan 3 4 5 6 port-priority 10 

2) ʹ·ֵ磺 

Switch_1(config)# interface fa0/1 

Switch_1(config-if)# spanning-tree vlan 2 3 4 cost 30 

Switch_1(config)# interface fa0/2 

Switch_1(config-if)# spanning-tree vlan 8 9 10 cost 30
